xend: vt-d: improved FLR logic for pass-thru PCI devices
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 14 Jul 2008 09:11:39 +0000 (10:11 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 14 Jul 2008 09:11:39 +0000 (10:11 +0100)
commit22527b8dcd89c18519a5515ce3d00e88460318ba
tree46d66eecf5406005640477789282625cf640d35c
parent910ece429105ed1f5c54ca476cd3149abe1607f5
xend: vt-d: improved FLR logic for pass-thru PCI devices

1) If the device is PCIe endpoint and supports PCIe FLR, we use that;
else

2) if the device is PCIe endpoint, and all functions on the
device are assigned to the same guest, we use the immediate parent
bus's Secondary Bus Reset to reset all functions of the device (here,
actually we require all the functions of the device be assigned to the
same guest); else

3) if the device is PCI endpoint and is on a host bus
(e.g. integrated devices), and if the device supports PCI Advanced
Capabilities, we use that for FLR; else

4) we use the Secondary Bus Reset (if the PCI device is behind a
PCI/PCI-X bridge, then all devices behind the uppermost such PCI/PCI-X
bridge above this device must be co-assigned).

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
tools/python/xen/util/pci.py
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/server/DevController.py
tools/python/xen/xend/server/pciif.py